home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / workbench+shell / g-p / madhouse / install < prev    next >
Text File  |  1995-09-17  |  12KB  |  470 lines

  1. ; Installation script for Madhouse V1.1
  2. ; Revision 2 - multilingual, docs in lha archive, size-checks.
  3.  
  4. (complete 0)
  5.  
  6. (set mainprgsource "Madhouse")
  7. (set mainprgdest "SYS:WBStartup")
  8.  
  9. ; File-sizes for space check. Including icons.
  10. (set size-mainprg 42000 )
  11. (set size-amoslib 48000 )
  12. (set size-locale 8000 )
  13. (set size-configed 93000 )
  14. (set size-blankers 510000 )
  15. (set size-germandoc 192000 )
  16. (set size-englishdoc 115000 )
  17.  
  18. (if (= @language "Deutsch") (
  19.     (set @def-anleit 0)
  20.     (set size-defaultdoc size-germandoc)
  21.     
  22.    (set #wrong-os
  23.     (cat "\nTut uns leid, Madhouse benötigt OS v2.04 oder höher!!\n"))
  24.     
  25.     (set #diskfull
  26.     (cat "Das Installationsscript muß leider abbrechen, weil auf der "
  27.          "Diskette / Festplattenpartition \"%s\" nicht genug Platz "
  28.           "vorhanden ist." ))
  29.     
  30.     (set #copying-mainprg
  31.     (cat "\nJetzt wird das Programm Madhouse in Ihre "
  32.                 "SYS:WBStartup-Schublade kopiert. Dort wird es dann nach "
  33.                     "jedem Reset gestartet.\n"
  34.                     "Dieses Programm verwaltet die "
  35.                     "Blanker, das Einstellungsprogramm muß ebenfalls damit "
  36.                     "aufgerufen werden."))
  37.     
  38.     (set #select-defdir
  39.     (cat "Bitte wählen Sie jetzt die Schublade, in der der "
  40.                 "Anleitungstext, der MadhouseConfigEd und die Blanker installiert werden sollen.\n"
  41.                 "Wenn Sie keine Festplatte haben, ist es praktisch, die "
  42.                     "Blanker auf eine Diskette zu installieren, die oft im "
  43.                     "Laufwerk liegt. Dann hat Madhouse mehr Gelegenheiten den "
  44.                     "Puffer mit einem neuen Blanker zu füllen.\n\n"
  45.                     "In diesem Verzeichnis sollten mindestens 610 KB frei sein!\n" ))
  46.     
  47.     (set #select-dir-prompt
  48.     (cat
  49.                 "Wählen Sie das Verzeichnis, in dem Madhouse installiert "
  50.                     "werden soll. Vergessen Sie nicht, ein neues Unterverzeichnis "
  51.                     "anzulegen, falls Sie eines wünschen!" ))
  52.     
  53.     (set #select-dir-help
  54.     (cat
  55.                 "Wie vorhin gesagt wurde, sollten Sie hier das Zielverzeichnis "
  56.                     "für Madhouse auswählen, in das die Anleitungen, der MadhouseConfigEd und "
  57.                     "die Blanker geschrieben werden.\nUm ein neues Verzeichnis anzulegen, "
  58.                     "benutzen Sie \"Make new drawer...\" und geben Sie den Namen in das Textfeld "
  59.                     "ein."))
  60.     
  61.     (set #no-min-space
  62.     (cat "Leider reicht der Platz auf der ausgewählten Diskette / Festplatte "
  63.          "nicht mal für die nötigsten Dateien. Bitte wählen Sie einen anderen "
  64.           "Pfad (\"Proceed\") oder brechen Sie die Installation ab "
  65.           "(\"Abort Install\")." ))
  66.     (set #no-doc-space
  67.     (cat "Der Platz auf der ausgewählten Diskette / Festplatte reicht zwar für "
  68.          "die nötigsten Dateien, aber die deutsche Anleitung paßt schon nicht "
  69.           "mehr. Wollen Sie einen neuen Pfad wählen?" ))
  70.     (set #yes
  71.     (cat "Ja." ))
  72.     (set #no
  73.     (cat "Nein." ))
  74.     
  75.     (set #doing-docs
  76.     (cat "Die deutsche Anleitung wird entpackt." ))
  77.     
  78.     (set #doing-configed
  79.     (cat "\nJetzt wird der MadhouseConfigEd kopiert." ))
  80.     
  81.     (set #blank 
  82.     (cat"\nJetzt werden die Blanker kopiert." ))
  83.                 
  84.     (set #icontext
  85.     (cat "Für das Madhouse-Programm in WBStartup/ stehen sieben Icons zur Auswahl (Zur "
  86.          "Entscheidungshilfe zuerst in Icons/ ansehen, dann fortfahren.)\n"
  87.           "MWB=Die MagicWB-Farben müssen installiert sein."))
  88.     (set #iconchoices-1
  89.     (cat "Standard-Icon (Hauptfenster)" ))
  90.     (set #iconchoices-2
  91.     (cat "Schwarzer Keil (MWB)" ))
  92.     (set #iconchoices-3
  93.     (cat "Monitor" ))
  94.     (set #iconchoices-4
  95.     (cat "Monitor (MWB)" ))
  96.     (set #iconchoices-5
  97.     (cat "Schwarzer Monitor" ))
  98.     (set #iconchoices-6
  99.     (cat "Schwarzer Monitor (MWB)" ))
  100.     (set #iconchoices-7
  101.     (cat "Madhouse-Schriftzug" ))
  102.     
  103.     (set #diskfull-locale
  104.     (cat "Dies ist zwar ein Amiga mit OS 2.1 oder höher, die deutschsprachigen "
  105.          "Locale-Dateien können jedoch trotzdem nicht installiert werden, weil "
  106.           "auf der zuständigen Diskette / Festplattenpartition nicht mehr "
  107.           "genügend Platz ist." ))
  108.     
  109.     (set #use-locale
  110.     (cat "TOLL! Dies ist ein Amiga mit OS 2.1 oder höher! Wenn Sie also wollen, können "
  111.                 "die Programtexte von Madhouse auf deutsch erscheinen.\n"
  112.                     "Sollen die deutschen Locale-Texte installiert werden?"))
  113.     (set #locale-1
  114.     (cat "Ja" ))
  115.     (set #locale-2
  116.     (cat "Diesen Teil überspringen" ))
  117.     
  118.     (set #doing-amoslib
  119.     (cat "Die amos.library wird kopiert ..." ))
  120.     
  121.     (set #extro
  122.     (cat "Madhouse wurde korrekt installiert. Beim Systemstart wird das Hauptprogramm "
  123.               "von nun an automatisch aktiviert, solange Sie nicht das Programm SYS:WBStartup/Madhouse "
  124.                   "löschen. Dort können Sie es jetzt auch direkt aufrufen, um einen Reset zu "
  125.                   "umgehen.\n"
  126.                   "Besonders, wenn Sie keine Festplatte besitzen, sollten Sie einen Blick in die "
  127.                   "Anleitung werfen, sonst natürlich auch...\n\n"
  128.                   "Viel Spaß!" ))
  129. ))
  130.  
  131.  
  132. (if (= @language "English") (
  133.     (set @def-anleit 1)
  134.     (set size-defaultdoc size-englishdoc)
  135.  
  136.    (set #wrong-os
  137.     (cat "\nSorry, Madhouse needs OS 2.04 or higher!\n"))
  138.         
  139.     (set #diskfull
  140.     (cat "The script has to abort, because the disk / partition \"%s\" does "
  141.          "not have enough free disk space." ))
  142.     
  143.     (set #copying-mainprg
  144.     (cat "\nNow, the programm Madhouse will be copied into your SYS:WBStartup-drawer. "
  145.          "There it will be started after every reset. This program handles the "
  146.           "blankers, and you have to run the prefs-editor \"MadhouseConfigEd\" from it."))
  147.     
  148.     (set #select-defdir
  149.     (cat "Please select the drawer, in which you want to copy the doc, MadhouseConfigEd "
  150.          "and the blankers in the following requester.\nIf you do not have a hard disk, "
  151.           "it is useful to install the blankers onto a disk which is used often. Madhouse "
  152.           "has more chances to refresh its buffer in this case.\nYou will need 610 KB of "
  153.           "disk space."))
  154.     
  155.     (set #select-dir-prompt
  156.     (cat "Select the drawer in which you want to install Madhouse. If you prefer an own "
  157.          "subdirectory for Madhouse, please create one!" ))
  158.     
  159.     (set #select-dir-help
  160.     (cat "The script will copy MadhouseConfigEd, the docs and the blankers into the "
  161.          "drawer you have to select here. Create a new directory by using "
  162.           "\"Make New Drawer...\" and entering the name of it into the string gadget." ))
  163.     
  164.     (set #doing-docs
  165.     (cat "Decrunching english documentation." ))
  166.     
  167.     (set #doing-configed
  168.     (cat "\nNow, MadhouseConfigEd will be copied." ))
  169.     
  170.     (set #blank 
  171.     (cat"\nNow, the blankers will be copied." ))
  172.                 
  173.     (set #icontext
  174.     (cat "You have got the choice out of seven icons for the Madhouse-program (in "
  175.          "SYS:WBStartup). To make a decision, you can look at the icons right now "
  176.           "(\"Icons\"-drawer) first. MWB = you "
  177.           "need the MagicWB-colors on your Workbench."))
  178.     (set #iconchoices-1
  179.     (cat "Standard-Icon (from Madhouse-dir)" ))
  180.     (set #iconchoices-2
  181.     (cat "Colored points & black area (MWB)" ))
  182.     (set #iconchoices-3
  183.     (cat "Monitor" ))
  184.     (set #iconchoices-4
  185.     (cat "Monitor (MWB)" ))
  186.     (set #iconchoices-5
  187.     (cat "Black Monitor" ))
  188.     (set #iconchoices-6
  189.     (cat "Black Monitor (MWB)" ))
  190.     (set #iconchoices-7
  191.     (cat "Madhouse-Text" ))
  192.     
  193.     ; Obsolete, english strings are built-in.
  194.     (set #use-locale
  195.     (cat "" ))
  196.     (set #locale-1
  197.     (cat "" ))
  198.     (set #locale-2
  199.     (cat "" ))
  200.     
  201.     (set #doing-amoslib
  202.     (cat "Copying amos.library ..." ))
  203.  
  204.     (set #extro
  205.     (cat "Madhouse was installed correctly. While booting, the main program \"Madhouse\" "
  206.          "will be started automatically, as long as you don't delete it (it is in "
  207.           "SYS:WBStartup). You can start it directly, if you don't want to reset your "
  208.           "machine.\nEspecially if you do not own a hard disk, you should read the "
  209.           "doc, otherwise you should it do anyway, of course...\n\nEnjoy!"))
  210. ))
  211.  
  212.  
  213.  
  214. ;  **** Auf OS 2.04 checken.
  215.  
  216. (if (< (/ (getversion) 65536) 37)
  217.     (
  218.         (message #wrong-os)
  219.         (exit (quiet))
  220.     )
  221. )
  222. (complete 1)
  223.  
  224.  
  225.  
  226. ;  **** Erster size-check
  227.  
  228. (set wb-space (getdiskspace "SYS:" ))
  229. (set lib-space (getdiskspace "LIBS:" ))
  230.  
  231. (if (< wb-space size-mainprg) (
  232.     (abort (#diskfull (expandpath "SYS:")) )
  233. ))
  234.  
  235. (if (< lib-space size-amoslib) (
  236.     (abort (#diskfull (expandpath "LIBS:")) )
  237. ))
  238.  
  239. (complete 2)
  240.  
  241.  
  242.  
  243.  
  244. ;  **** Main-Program in SYS:WBStartup/
  245.  
  246. (complete 0)
  247.  
  248. (message #copying-mainprg )
  249.  
  250. (copyfiles
  251.   (source mainprgsource)
  252.   (dest mainprgdest)
  253. )
  254. (complete 10)
  255.  
  256.  
  257.  
  258. ;  **** Icon for Main-Program
  259.  
  260. (run ("delete SYS:WBStartup/Madhouse.info"))
  261. (set icontype (askchoice
  262.         (prompt #icontext )
  263.         (help    ""    )
  264.         (choices #iconchoices-1 #iconchoices-2 #iconchoices-3 #iconchoices-4 #iconchoices-5 #iconchoices-6 #iconchoices-7 )
  265.         (default 5)
  266.     )
  267. )
  268. (set @icondest "BlaBla!")
  269. (if (= icontype 0) (
  270.     (set @iconsource "Madhouse.info")
  271.     (set @icondest "SYS:WBStartup/Madhouse.info")
  272. ))
  273. (if (= icontype 1) (
  274.     (set @iconsource "Icons/Madhouse_MWB1.info")
  275.     (set @icondest "SYS:WBStartup/Madhouse_MWB1.info")
  276. ))
  277. (if (= icontype 2) (
  278.     (set @iconsource "Icons/Madhouse2.info")
  279.     (set @icondest "SYS:WBStartup/Madhouse2.info")
  280. ))
  281. (if (= icontype 3) (
  282.     (set @iconsource "Icons/Madhouse_MWB2.info")
  283.     (set @icondest "SYS:WBStartup/Madhouse_MWB2.info")
  284. ))
  285. (if (= icontype 4) (
  286.     (set @iconsource "Icons/Madhouse3.info")
  287.     (set @icondest "SYS:WBStartup/Madhouse3.info")
  288. ))
  289. (if (= icontype 5) (
  290.     (set @iconsource "Icons/Madhouse_MWB3.info")
  291.     (set @icondest "SYS:WBStartup/Madhouse_MWB3.info")
  292. ))
  293. (if (= icontype 6) (
  294.     (set @iconsource "Icons/Madhouse4.info")
  295.     (set @icondest "SYS:WBStartup/Madhouse4.info")
  296. ))
  297. (copyfiles
  298.     (source @iconsource)
  299.     (dest "SYS:WBStartup")
  300. )
  301. (run ("rename %s SYS:WBStartup/Madhouse.info" @icondest ))
  302. (complete 17)
  303.  
  304.  
  305.  
  306. ;  **** Locale
  307.  
  308. (if (> (/ (getversion) 65536) 37)
  309.     (
  310.         (if (<> @language "English" ) (
  311.  
  312.             (set loc-space (getdiskspace "LOCALE:" ))
  313.             (if (< loc-space size-locale) (
  314.                     (message ( #diskfull-locale ))
  315.                 )(
  316.                     (if (askbool (prompt #use-locale)
  317.                                  (help "")
  318.                                  (choices #locale-1 #locale-2 ))
  319.                     (
  320.                         (copyfiles
  321.                            (source "locale/deutsch/madhouse.catalog")
  322.                            (dest "LOCALE:Catalogs/deutsch")
  323.                         )    
  324.                     ))
  325.             ))
  326.         ))
  327.     )
  328. )
  329. (complete 27)
  330.  
  331.  
  332.   
  333. ;  **** Library
  334.  
  335. (copylib
  336.     (prompt #doing-amoslib )
  337.     (help "" )
  338.     (source "libs/amos.library")
  339.     (dest "Libs:")
  340.     (confirm)
  341. )
  342.  
  343. (complete 30)
  344.  
  345.  
  346.  
  347. ;  **** Set directory for docs, blankers etc...
  348.  
  349. (set min-space (+ size-configed size-blankers))
  350. (set doc-space (+ min-space size-defaultdoc))
  351.  
  352. (message #select-defdir )
  353.  
  354. (set loopagain 1)
  355.  
  356. (while loopagain (
  357.     (set @default-dest
  358.       (askdir
  359.         (prompt #select-dir-prompt )
  360.         (help #select-dir-help )
  361.          (default ":")
  362.       )
  363.     )
  364.     
  365.     (set avail-space (getdiskspace @default-dest))
  366.  
  367.     (if (< avail-space min-space) (
  368.         ; Viel zu wenig Platz für's nötigste
  369.         (message #no-min-space)
  370.     )(
  371.         (if (< avail-space doc-space) (
  372.             ; Blanker passen, sonst nichts.
  373.             (if (askbool (prompt #no-doc-space)
  374.              (help "")
  375.              (choices #yes #no ))
  376.             (
  377.                 (set loopagain 1)
  378.             )(
  379.                 (set loopagain 0)
  380.             ))
  381.         )(
  382.             ; Alles paßt.
  383.             (set loopagain 0)
  384.         ))
  385.     ))
  386. ))
  387.  
  388. (complete 40)
  389.  
  390.  
  391.  
  392. ;  **** DOC-FILES
  393.  
  394. (working #doing-docs)
  395.  
  396. ; I need this for my lha-version, which expects an "/" after the path.
  397. (if (= (strlen (cat @default-dest "/x")) (strlen (tackon @default-dest "x")))
  398.     (set lha-dest (cat @default-dest "/" ))
  399.      (set lha-dest @default-dest)
  400. )
  401.  
  402. (if (> avail-space doc-space) (
  403.     (if (= @def-anleit 0) ( 
  404.         (run ("C:Lha -q -E -I e Documentations.lha Anleitung.guide Anleitung.guide.info Registration_D.txt \"%s\"" lha-dest ))
  405.     )(
  406.         (run ("C:Lha -q -E -I e Documentations.lha Doc.guide Doc.guide.info Registration_E.txt \"%s\"" lha-dest ))
  407.     ))
  408. ))
  409.  
  410. (complete 50)
  411.  
  412.  
  413.  
  414. ;  **** MadhouseConfigEd
  415.  
  416. (message #doing-configed)
  417. (copyfiles
  418.    (source "MadhouseConfigEd")
  419.    (dest @default-dest)
  420. )
  421. (complete 60)
  422.  
  423.  
  424.  
  425. ;  **** Blankers
  426.  
  427. (message #blank )
  428.  
  429. (set bl-dest ( tackon @default-dest "Blankers" ) )
  430.  
  431. (makedir bl-dest )
  432.  
  433. (copyfiles
  434.     (source "blankers" )
  435.     (dest bl-dest )
  436.     (help "" )
  437.     (all)
  438.     (infos)
  439. )
  440.  
  441. (copyfiles
  442.     (source "blankers.info" )
  443.     (dest @default-dest )
  444.     (help "" )
  445.     (infos)
  446. )
  447.  
  448. (complete 98)
  449.  
  450.  
  451.  
  452. ;  **** Set ToolType for SYS:WBStartup/Madhouse
  453.  
  454. (tooltype  (dest "SYS:WBStartup/Madhouse")
  455.            (settooltype "CONFIGED" (tackon @default-dest "MadhouseConfigEd"))
  456. )
  457. (complete 100)
  458.  
  459.  
  460.  
  461. ;  **** Extro
  462.  
  463. (message #extro)
  464.  
  465.  
  466.  
  467. ;   **** Finished!
  468.  
  469.  
  470.